package com.sudo.client.task;

import com.sudo.rpc.api.annotation.TaskComponent;
import com.sudo.rpc.api.annotation.TaskNote;
import com.sudo.rpc.api.utils.RpcRes;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

@Slf4j
@TaskComponent
public class TestFxwService {

    @TaskNote(desc = "随便写点",params = "offset1(Integer,false,1,偏移量1)|offset2(Integer,true,2,偏移量2)")
    public RpcRes ceshi(Map<String, Object> paramMap) {
        int offset1 = Integer.parseInt(paramMap.get("offset1").toString());
        int offset2 = Integer.parseInt(paramMap.get("offset2").toString());
        log.info("参数1：{}，参数2：{}",offset1,offset2);
        return RpcRes.ok(offset2, "日期：2023-07-22");
    }
}
